/**
 * 权限校验
 */

// 账户分类，admin权限最高
export function getCurrentAuthority() {
  return ["admin"];
}

// 判断当前用户是否有权限访问
export function check(authority) {
  const current = getCurrentAuthority();
  return current.some((item) => authority.includes(item));
}

// 判断当前用户是否登录
export function isLogin() {
  const current = getCurrentAuthority();
  return current && current[0] !== "guest";
}
